package com.newblog.factory;

import java.sql.Connection;

import com.newblog.dao.TagDAO;
import com.newblog.dao.TagDAOMysql;

public class TagDaoFactory{
	private static TagDaoFactory factory = null;
	private  TagDAO tagDao = null;
	private  Connection conn = null; 
	private TagDaoFactory(){
        conn = DB.getConn();
        tagDao  = new TagDAOMysql(conn);
		 
	}
    public static synchronized TagDaoFactory getInstance(){
		if(factory==null){
		   factory  = new TagDaoFactory();
		 }
		return factory;
       }
    public  TagDAO createTagDAO(){
    	  return tagDao;
    	
    }
}
	


